<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<script src="index.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="index.css"/>
		<title>特殊链接</title>
	</head>

	<body>
		<div class="content" id="cotent_idd" itemprop="articleBody">
			<p></p>
			<p>如果需要在移动浏览器中实现拨打电话，调用sms，发送email等功能，移动手机WEB页面(HTML5)Javascript提供的接口是一个好办法。</p>
			<p>采用url链接的方式，实现在Safari ios，Android 浏览器，webos浏览器，塞班浏览器，IE，Operamini等主流浏览器，进行拨打电话功能。</p>
			<h1>1. 打电话</h1>
			<p>在电话号码前面可以加上 + （加号）表示国际号码。如：</p>
			<p><strong>最常用WEB页面JS实现一键拨号的电话拨打功能</strong></p>
			<p>例子：&nbsp;</p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="tel:10086"</span><span>&gt;</span>10086<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

			<p><strong>使用wtai协议进行拨打电话</strong></p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="wtai://wp/mc;10086"</span><span>&gt;</span>10086<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

			<p><span>2. 短信</span></p>
			<p>如果是需要调用短信的接口，可以将链接写成下面的格式：</p>

			<pre class="code"><span>1</span> sms:<span>&lt;</span><span>phone_number</span><span>&gt;</span>[,<span>&lt;</span><span>phone-number</span><span>&gt;</span>]*[?body=<span>&lt;</span><span>message_body</span><span>&gt;</span>]</pre>

			<p><span>例如：</span></p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="sms:10086"</span><span>&gt;</span>给 10086 发短信<span>&lt;/</span><span>a</span><span>&gt;&lt;</span><span>br </span><span>/&gt;</span>
<span>2</span> 
<span>3</span> <span>&lt;</span><span>a </span><span>href</span><span>="sms:10086?body=cxye"</span><span>&gt;</span>给 10086 发送内容为"cxye"的短信<span>&lt;/</span><span>a</span><span>&gt;&lt;</span><span>br </span><span>/&gt;</span>
<span>4</span> 
<span>5</span> <span>&lt;</span><span>a </span><span>href</span><span>="sms:10086,10010?body=cxye"</span><span>&gt;</span>给 10086 和 10010 发送内容为"cxye"的短信<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

			<p>&nbsp;</p>
			<h1>3. Mail 邮件</h1>
			<p>就和普通的html一样使用mailto</p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="mailto:test1@163.com"</span><span>&gt;</span>mail<span>&lt;/</span><span>a</span><span>&gt;</span>
<span>2</span> 
<span>3</span> <span>&lt;</span><span>a </span><span>href</span><span>="mailto:test1@163.com,test2@126.com"</span><span>&gt;</span>mail<span>&lt;/</span><span>a</span><span>&gt;</span>
<span>4</span> 
<span>5</span> <span>&lt;</span><span>a </span><span>href</span><span>="mailto:test1@163.com?subject=Testing"</span><span>&gt;</span>mail<span>&lt;/</span><span>a</span><span>&gt;</span>
<span>6</span> 
<span>7</span> <span>&lt;</span><span>a </span><span>href</span><span>="mailto:test1@163.com?subject=Testing mailto&amp;cc=test3@126.com"</span><span>&gt;</span>mail<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

			<p>&nbsp;</p>
			<h1>4. Android Market</h1>
			<p>如果希望一个链接能够激活Android市场的功能，可以把链接写成：</p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="market://search?q=[query]"</span><span>&gt;</span>Android Market link<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

			<p><span>其中&lt;query&gt;就是搜索的内容，你应用的名称</span></p>
			<p>例子：</p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="market://search?q=MyApp"</span><span>&gt;</span>MyApp<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

			<p><span>5. 地图定位GPS</span></p>

			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="geopoint:[经度],[纬度]"</span><span>&gt;</span>我的位置<span>&lt;/</span><span>a</span><span>&gt;</span></pre>
			<p><span>例如：</span></p>
			<pre class="code"><span>1</span> <span>&lt;</span><span>a </span><span>href</span><span>="geopoint:108.954823,34.275891"</span><span>&gt;</span>我的位置<span>&lt;/</span><span>a</span><span>&gt;</span></pre>

	</body>

</html>